package com.nb.hdj.moduleClass.loginModule;

import com.nb.hdj.controller.HelloController;
import com.nb.hdj.page.LoginPage;
import com.nb.hdj.util.JsonDataSaveUtil;
import org.openqa.selenium.WebDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description: 登录行为
 * @Author: hedongjia
 * @Date: 2021/11/4 上午11:09
 * @Version: v1.0
 */
public class LoginAction {
    private static final Logger logger = LoggerFactory.getLogger(LoginAction.class);
    JsonDataSaveUtil jsonDataSaveUtil=new JsonDataSaveUtil();
    LoginPage loginPage=new LoginPage();

    /**
     * 打开aim-test2-service网址
     */
    public void openAimServiceUrlAction(WebDriver driver){
            try{
                String loginUrl =jsonDataSaveUtil.ObjectToString(loginPage.getLoginPageElements().get("loginUrl"));
                driver.get(loginUrl);
            }catch (Exception e){
                e.fillInStackTrace();
                logger.error("-----登录页报错----{}",e.getMessage());
            }
    }

    /**
     * 输入账号密码验证码
     */
}
